﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace BBICMS.Model.ViewModel.Back
{
    public class CompanyInfoVM
    {
        [Required]
        [StringLength(50)]
        [Display(Name = "公司名称")]
        public string CompanyName { get; set; }
        [Display(Name = "公司简称")]
        [StringLength(50)]
        public string CompanyShortName { get; set; }

        [Required]
        [DataType(DataType.MultilineText)]
        [Display(Name = "公司地址")]       
        [StringLength(250)]
        public string Address { get; set; }

        [Display(Name = "地理坐标", Prompt = "地理坐标")]
        [StringLength(50)]
        [RegularExpression(@"^[0-9]+(\.[0-9]+),[0-9]+(\.[0-9]+)$", ErrorMessage = "坐标格式不正确")]
         public string Coordinate { get; set; }

        [Required]
        [Display(Name = "联系人")]
        [StringLength(50)]
        public string ContactMan { get; set; }

        [Required]
        [Display(Name = "手机")]
       // [Mobile(ErrorMessage = "手机号格式不正确")]     //自定义验证
        [RegularExpression(@"^(1[3,5,8,7]{1}[\d]{9})|(((400)-(\d{3})-(\d{4}))|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})" + 
            @"|(\d{4}|\d{3})-(\d{3,7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)$",ErrorMessage="手机号码格式不正确")]
        public string Mobile { get; set; }

        [Required]
        [Display(Name = "电话")]
        [StringLength(50)]
        public string Phone { get; set; }
        [Display(Name = "传真")]
        [StringLength(50)]
        public string Fax { get; set; }
      
        [Display(Name = "邮政编码")]
        [StringLength(50)]
        public string ZipCode { get; set; }

        [Required]
        [EmailAddress(ErrorMessage = "邮箱格式不正确")]     
        [Display(Name = "邮箱")]
        [StringLength(150)]
        public string MailTo { get; set; }

     
        [EmailAddress(ErrorMessage = "邮箱格式不正确")]    
        [Display(Name = "备用邮箱")]
        [StringLength(150)]
        public string MailCC { get; set; }

       
    }
}
